import { useState } from 'react';
import { NewDocModal } from '../../widgets/LeftPanel/modals/NewDocModal';
// import { http } from '@amcax/base';
function AddDoc({ onClose }) {
  const [addDocModalOpen, setAddDocModalOpen] = useState(true);
  return (
    <NewDocModal
      open={addDocModalOpen}
      onClose={() => {
        onClose();
        setAddDocModalOpen(false);
      }}
    />
  );
}
export const cmdAddDoc = {
  id: 'CmdAddDoc',
  label: 'command.add-part-or-product',
  icon: 'constraints/new-part',
  create: (label: string, onClose: () => void) => <AddDoc onClose={onClose} />,
};
